package com.wc.AlgoOJ._线性DP.A708;

import java.util.Scanner;

/**
 * @Author congege
 * @Description 光头强的EOF牛肉串
 * http://43.138.190.70:8888/p/A708
 * @Date Created in 2023/12/10-15:10
 */
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long[] ef = new long[41];
        long[] o = new long[41];
        ef[1] = 2;
        o[1] = 1;
        for (int i = 2; i <= 40; i++) {
            ef[i] = (ef[i - 1] + o[i - 1]) * 2;
            o[i] = ef[i - 1];
        }
        while (sc.hasNext()) {
            int n = sc.nextInt();
            System.out.println(ef[n] + o[n]);
        }
    }
}
